<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <form action="postParameter" method = "post">
        <input type="text" name="studentId">
        <input type="text" name="classId">
        <input type="submit" value="提交">

    </form>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script>
    $.ajax({
        type:'post',
<!--        type:'delete',-->
        //相对路径
        url:'method',
        //绝对路径
        // url:/ServletHelloWorld/method
        success :function(body,status){
            console.log(body);
<!--            console.log(status);-->
       }
    });
</script>
</body>
</html>